import React,{Component} from 'react';
import { View ,StyleSheet} from 'react-native';
import { NumberBox , Label} from 'iftide';

export default class Basic extends Component {
    constructor(props) {
        super(props);
    }
    onPress(val){
        console.log(val)
    }
    render(){
        return (
            <View style={{flex:1,height: '100%'}}>
                <View style={styles.container}>
                    <Label text = '数字加减框- 方式一' fontWeight={'bold'} textDecorationLine={'underline'} onPress={()=>this._onPress()}/>
                </View>
                <NumberBox text={'10'} max={15} min={1} callBackEvent={this.onPress}/>

                <View style={{height: 20}}/>

                <View style={styles.container}>
                    <Label text = '数字加减框- 方式二' fontWeight={'bold'} textDecorationLine={'underline'} onPress={()=>this._onPress()}/>
                </View>
                <NumberBox text={'6'} max={10} min={0} step={2} callBackEvent={this.onPress}/>

                <View style={{height: 20}}/>

                <View style={styles.container}>
                    <Label text = '数字加减框- 方式三' fontWeight={'bold'} textDecorationLine={'underline'} onPress={()=>this._onPress()}/>
                </View>
                <NumberBox text={'20'} max={100} disabledInput={true} callBackEvent={this.onPress}/>
            </View>
        );
    }
}

const styles = StyleSheet.create({
    container: {
        paddingHorizontal: 13,
        paddingVertical: 8,
        backgroundColor: '#F5F7F9',
    },
    item : {
        flexDirection: 'row',
    }
});